﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

namespace Infinite.Systems.Util.Library.Messaging
{
    /// <summary>
    /// Provides properties to initialize the Email Packet object . This includes
    /// BodyContent, Subject, Recipient and MailFrom 
    /// </summary>
    public class EmailPacket
    {
        #region "Init"
        /// <summary>
        /// Initializes EmailPacket Object
        /// </summary>
        /// <param name="bodyPath">Path of the file that will be used as Email Template</param>
        /// <param name="subject">Subject of the email</param>
        public EmailPacket(string bodyPath, string subject, string emailFrom)
        {

            this.BodyContent = File.ReadAllText(bodyPath);
            this.Subject = subject;
            this.MailFrom = emailFrom;
           
        }
        #endregion

        #region "Properties"
        /// <summary>
        /// Gets or Sets Source of the body
        /// </summary>
        public string BodyContent { get; set; }
        /// <summary>
        /// Gets or Sets subject Line of the email
        /// </summary>
        public string Subject { get; set; }
        /// <summary>
        /// Gets or Sets Email Recipient
        /// </summary>
        public string EmailRecipient { get; set; }
        /// <summary>
        /// Gets or Sets the email id which is to be used to send email
        /// </summary>
        public string MailFrom { get; set; }
        /// <summary>
        /// Gets or sets the attachment path
        /// </summary>
        public string AttachmentPath { get; set; }
        #endregion

    }
}
